package com.hgdp.mybatisplus.serviceImpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hgdp.mybatisplus.dao.UserMapper;
import com.hgdp.mybatisplus.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl {
    @Autowired
    UserMapper userMapper;


    public IPage<User> select(Page page, QueryWrapper<User> wrapper){
        return userMapper.selectAll(page,wrapper);
    }

    public int insert(User user){
        int insert = userMapper.insert(user);
        return insert;
    }
}
